package com.bnlr.lrparking.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.bnlr.lrparking.R;
import com.bnlr.lrparking.model.DepositListM;

import java.util.List;

/**
 * 充值记录列表
 *
 * @author rr
 * @date 2016/7/2
 */
public class DepositListAdapter extends BaseQuickAdapter<DepositListM.DataBean, BaseViewHolder> {

    public DepositListAdapter(List<DepositListM.DataBean> data) {
        super(R.layout.item_recharge, data);
    }

    @Override
    protected void convert(BaseViewHolder holder, DepositListM.DataBean item) {
        holder.setIsRecyclable(false);
        String text = "";
        switch (item.getApplyMode()) {
            case 0:
                text = "提现到银行卡";
                break;
            case 1:
                text = "提现到支付宝";
                break;
            case 2:
                text = "提现到微信";
                break;
            default:
                break;
        }
        holder.setText(R.id.item_rechargetype, text);
        holder.setText(R.id.item_time, item.getCreateTime());
        holder.setText(R.id.tv_price_re, item.getIncomeValue() + "");
        holder.setText(R.id.tv_money, item.getMoney());
    }
}
